const exampleOnLoadPlugin = require('./exampleOnLoadPlugin');
const path = require('path');

require('esbuild')
  .build({
    entryPoints: [path.resolve(__dirname,'src/index.js')],
    bundle: true,
    outdir: 'dist',
    loader: {
      '.png': 'dataurl'
    },
    plugins: [
      exampleOnLoadPlugin
    ]
  })
  .catch(() => process.exit(1));
